﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WinBot.EventsForm
{
    public partial class Form_KeyboardReleased : Form
    {
        public static WinEvent ev;
        public Form_KeyboardReleased()
        {
            InitializeComponent();

            foreach (string key in Enum.GetNames(typeof(Keys)))
            {
                comboBox1.Items.Add(key);
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            ev = new WinEvent(new KeyEventArgs((Keys)Enum.Parse(typeof(Keys), comboBox1.SelectedItem.ToString())), 0, WinEvent.ArgsEventType.Released);
            FormClose(null, new EventArgs());
            this.Close();
        }

        public static event EventHandler FormClose = delegate { };
    }
}
